
using System;
using System.Linq;
using Csla;
using Csla.Data;
using Csla.Security;
using Csla.Validation;

namespace HousingInfo.Library
{ 
	public partial class ContactBO : Csla.BusinessBase<ContactBO>
	{

		#region Authorization Rules
		protected override void AddAuthorizationRules()
		{
			//TODO: Define authorization rules in ContactBO
			//AuthorizationRules.AllowRead(ContactIDProperty, "ContactBOReadGroup");
			//AuthorizationRules.AllowRead(NameProperty, "ContactBOReadGroup");
			//AuthorizationRules.AllowRead(IsYahooProperty, "ContactBOReadGroup");
			//AuthorizationRules.AllowRead(IsSkyperProperty, "ContactBOReadGroup");
			//AuthorizationRules.AllowRead(EmailProperty, "ContactBOReadGroup");
			//AuthorizationRules.AllowRead(TitleProperty, "ContactBOReadGroup");
			//AuthorizationRules.AllowRead(ContactContentProperty, "ContactBOReadGroup");
			//AuthorizationRules.AllowRead(CreadedDateProperty, "ContactBOReadGroup");
			//AuthorizationRules.AllowRead(UpdatedDateProperty, "ContactBOReadGroup");
			//AuthorizationRules.AllowRead(IsCheckProperty, "ContactBOReadGroup");
			//AuthorizationRules.AllowRead(IsActiveProperty, "ContactBOReadGroup");

			//AuthorizationRules.AllowWrite(NameProperty, "ContactBOWriteGroup");
			//AuthorizationRules.AllowWrite(IsYahooProperty, "ContactBOWriteGroup");
			//AuthorizationRules.AllowWrite(IsSkyperProperty, "ContactBOWriteGroup");
			//AuthorizationRules.AllowWrite(EmailProperty, "ContactBOWriteGroup");
			//AuthorizationRules.AllowWrite(TitleProperty, "ContactBOWriteGroup");
			//AuthorizationRules.AllowWrite(ContactContentProperty, "ContactBOWriteGroup");
			//AuthorizationRules.AllowWrite(CreadedDateProperty, "ContactBOWriteGroup");
			//AuthorizationRules.AllowWrite(UpdatedDateProperty, "ContactBOWriteGroup");
			//AuthorizationRules.AllowWrite(IsCheckProperty, "ContactBOWriteGroup");
			//AuthorizationRules.AllowWrite(IsActiveProperty, "ContactBOWriteGroup");
		}

		protected static void AddObjectAuthorizationRules()
		{
			//TODO: Define object-level authorization rules of ContactBO
			//AuthorizationRules.AllowCreate(typeof(ContactBO), "ContactBOCreateGroup"));
			//AuthorizationRules.AllowEdit(typeof(ContactBO), "ContactBOEditGroup"));
			//AuthorizationRules.AllowDelete(typeof(ContactBO), "ContactBODeleteGroup"));
		}
		#endregion //Authorization Rules
		private void AssignParentKey(HousingInfo.DataLinQ.Contact data)
		{
			 //data.ParentId = ReadProperty<ParentBO>(ParentBOProperty).Id;
		}

	}
}
